
package com.jims.master.modules.doctor.entity;

import com.jims.master.modules.sys.utils.UserUtils;
import org.hibernate.validator.constraints.Length;

import com.jims.master.common.persistence.DataEntity;

/**
 * 门诊医嘱Entity
 * @author CTQ
 * @version 2017-03-13
 */
public class ClinicOrders extends DataEntity<ClinicOrders> {
	
	private static final long serialVersionUID = 1L;
	private String clinicId;		// 门诊记录
	private String patientId;		// 病人信息Id
	private String applyId;		// 申请表ID
	private String itemClass;		// 项目类型
	private String isApply;		// 是否申请单
	private String chargeFlag;		// 收费标志
	private String implementUser;		// 执行人
	private String implementDept;		// 执行科室
	private String applyNo;		// 申请单号
	private String rcptNo;		// 收费
	private ClinicMaster clinicMaster;//病人诊疗信息
	private Double price;//总价格
	private Double costs;//实收
	private Double charges;//应收
    private String ordersFlag;
    private String isUpload="0";//是否医保上传
    private boolean onlyLocal;
	private String applyDept;//申请科室
     public boolean isOnlyLocal() {
        return onlyLocal;
    }

    public void setOnlyLocal(boolean onlyLocal) {
        this.onlyLocal = onlyLocal;
    }

    public String getDeptId() {
        if(onlyLocal){
            return UserUtils.getUser().getOrgDept().getId();
        }
        return null;
    }



    public ClinicOrders() {
		super();
	}

	public ClinicOrders(String id){
		super(id);
	}


    public String getIsUpload() {
        return isUpload;
    }

    public void setIsUpload(String isUpload) {
        this.isUpload = isUpload;
    }

    @Length(min=1, max=64, message="门诊记录长度必须介于 1 和 64 之间")
	public String getClinicId() {
		return clinicId;
	}

	public void setClinicId(String clinicId) {
		this.clinicId = clinicId;
	}
	
	@Length(min=1, max=64, message="病人信息Id长度必须介于 1 和 64 之间")
	public String getPatientId() {
		return patientId;
	}

	public void setPatientId(String patientId) {
		this.patientId = patientId;
	}
	
	@Length(min=1, max=64, message="申请表ID长度必须介于 1 和 64 之间")
	public String getApplyId() {
		return applyId;
	}

	public void setApplyId(String applyId) {
		this.applyId = applyId;
	}
	
	@Length(min=0, max=1, message="项目类型长度必须介于 0 和 1 之间")
	public String getItemClass() {
		return itemClass;
	}

	public void setItemClass(String itemClass) {
		this.itemClass = itemClass;
	}
	
	@Length(min=0, max=1, message="是否申请单长度必须介于 0 和 1 之间")
	public String getIsApply() {
		return isApply;
	}

	public void setIsApply(String isApply) {
		this.isApply = isApply;
	}
	
	@Length(min=1, max=1, message="收费标志长度必须介于 1 和 1 之间")
	public String getChargeFlag() {
		return chargeFlag;
	}

	public void setChargeFlag(String chargeFlag) {
		this.chargeFlag = chargeFlag;
	}
	
	@Length(min=0, max=64, message="执行人长度必须介于 0 和 64 之间")
	public String getImplementUser() {
		return implementUser;
	}

	public void setImplementUser(String implementUser) {
		this.implementUser = implementUser;
	}
	
	@Length(min=0, max=64, message="执行科室长度必须介于 0 和 64 之间")
	public String getImplementDept() {
		return implementDept;
	}

	public void setImplementDept(String implementDept) {
		this.implementDept = implementDept;
	}
	
	@Length(min=0, max=200, message="申请单号长度必须介于 0 和 200 之间")
	public String getApplyNo() {
		return applyNo;
	}

	public void setApplyNo(String applyNo) {
		this.applyNo = applyNo;
	}
	
	@Length(min=0, max=200, message="收费号长度必须介于 0 和 200 之间")
	public String getRcptNo() {
		return rcptNo;
	}

	public void setRcptNo(String rcptNo) {
		this.rcptNo = rcptNo;
	}

	public ClinicMaster getClinicMaster() {
		return clinicMaster;
	}

	public void setClinicMaster(ClinicMaster clinicMaster) {
		this.clinicMaster = clinicMaster;
	}

	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

    public String getOrdersFlag() {
        return ordersFlag;
    }

    public void setOrdersFlag(String ordersFlag) {
        this.ordersFlag = ordersFlag;
    }

	public Double getCosts() {
		return costs;
	}

	public void setCosts(Double costs) {
		this.costs = costs;
	}

	public Double getCharges() {
		return charges;
	}

	public void setCharges(Double charges) {
		this.charges = charges;
	}

	public String getApplyDept() {
		return applyDept;
	}

	public void setApplyDept(String applyDept) {
		this.applyDept = applyDept;
	}
}